www.gusucode.com > 乘风广告联盟系统(Access版) v4.9 > 乘风广告联盟系统(Access版) v4.9\code\Action\User\iplist.asp

    <%
'乘风广告联盟系统 Access版
'作者QQ:178575
'作者EMail:yliangcf@163.com
'作者网站:http://www.qqcf.com
'详细简介:http://www.qqcf.com/cfwztg.htm
'上面有程序在线演示,安装演示,使用疑难解答,最新版本下载等内容
'因为这些内容可能时常更新,就没有放在程序里,请自己上网站查看
%>
<table class="tb_1">
  <tr> 

      <td colspan="16">选择查询的日期 
<select id='adddate' onChange="window.location=document.getElementById('adddate').options[document.getElementById('adddate').selectedIndex].value">
<option value=?Action=iplist>请选择日期</option>
            <%
Sql="Select AddDate From CFWztg_Visit_Ip Group By AddDate Order By AddDate Desc"
Set Rs = Server.CreateObject("Adodb.Recordset")
Rs.open Sql,Conn,1,1
While Not Rs.Eof
 Response.Write "<option value='?Action=iplist&AddDate="&Rs("AddDate")&"'"
 If ChkStr(Request("AddDate"),3)=Cstr(Rs("AddDate")) Then Response.Write " selected"
 Response.Write ">"&Rs("AddDate")&"</option>"
Rs.MoveNext
Wend
%>
        </select></td>
  </tr>
  <%
Px=ChkStr(Request("Px"),1)
AddDate=ChkStr(Request("AddDate"),3)

Ad_ID=ChkStr(Request("Ad_ID"),2)

IpArea_2=ChkStr(Request("IpArea_2"),2)

Ip=ChkStr(Request("Ip"),1)
Ly=ChkStr(Request("Ly"),1)

If ChkStr(Request("PageNum"),2)="" Then
 PageNum=20
Else
 PageNum=CLng(ChkStr(Request("PageNum"),2))
End If

If Px="" Then  Px="ID"
If AddDate="" Then AddDate=Cstr(Date)
If PageNum>100 Then Call AlertUrl("每页显示数输入不能大于100","?Action=iplist")

Call PxFilter(Px,"SpaceTime,id,UserName,Ip,Ad_ID,Ly,Ly_2,Keyword,AddTime,LastTime,AgentStr,Alexa,WebWidth,WebHeight,WebTop,WebLeft,MouseTop,MouseLeft,ScreenWidth,ScreenHeight,ScreenColorDepth,Ostype,BrowserType,ErrorClickTotal,PvTotal,LastUrl,LastTime,FirstShowTime,VisitTotal,LowUnionUserName")


Sql="Select Count(*) From CFWztg_Visit_Ip where UserName='"&UserName&"' And Datediff('d',AddDate,'"&AddDate&"')=0"
Set Rs=Conn.execute(Sql)
IpTotal=Rs(0)


Sql="Select Top 2000 * From CFWztg_Visit_Ip where UserName='"&UserName&"' And Datediff('d',AddDate,'"&AddDate&"')=0"


 If Ad_ID<>"" Then Sql=Sql&" And Ad_ID="&Ad_ID
 If Ip<>"" Then Sql=Sql&" And Ip Like '%"&Ip&"%'"
 If IpArea_2<>"" Then Sql=Sql&" And IpArea_2="&IpArea_2
 If Ly<>"" Then Sql=Sql&" And Ly Like '%"&Ly&"%'"

Sql=Sql&" Order By "&Px&" Desc"

Set Rs = Server.CreateObject("ADODB.Recordset")
Rs.open Sql,Conn,1,1

If Not Rs.eof Then
 If ChkStr(Request("Page"),2) = "" Then
  Page = 1
 Else 
  Page = CLng(ChkStr(Request("Page"),2))
 End If
 
 Rs.pagesize = PageNum
 TotalRs=Rs.RecordCount
 TotalPage=Rs.PageCount
 MyPageSize=Rs.PageSize
 Rs.AbsolutePage=Page
End If
%>
  <tr  class="tr_1"> 
    <td colspan="16"><%=AddDate%> Ip记录[可点击标题排序]</td>
  </tr>
  <tr  class="tr_2"> 
    <td><a href="?Action=<%=Action%>&Ad_ID=<%=Ad_ID%>&AddDate=<%=AddDate%>&Ip=<%=Ip%>&IpArea_2=<%=IpArea_2%>&Ly=<%=Ly%>&PageNum=<%=PageNum%>&Px=ID">序号</a></td>
    <td><a href="?Action=<%=Action%>&Ad_ID=<%=Ad_ID%>&AddDate=<%=AddDate%>&Ip=<%=Ip%>&IpArea_2=<%=IpArea_2%>&Ly=<%=Ly%>&PageNum=<%=PageNum%>&Px=IP">IP</a></td>
    <td><a href="?Action=<%=Action%>&Ad_ID=<%=Ad_ID%>&AddDate=<%=AddDate%>&Ip=<%=Ip%>&IpArea_2=<%=IpArea_2%>&Ly=<%=Ly%>&PageNum=<%=PageNum%>&Px=Ad_ID">广告</a></td>

	<td><a href="?Action=<%=Action%>&Ad_ID=<%=Ad_ID%>&AddDate=<%=AddDate%>&Ip=<%=Ip%>&IpArea_2=<%=IpArea_2%>&Ly=<%=Ly%>&PageNum=<%=PageNum%>&Px=FirstShowTime">初显时间</a></td>
	<td><a href="?Action=<%=Action%>&Ad_ID=<%=Ad_ID%>&AddDate=<%=AddDate%>&Ip=<%=Ip%>&IpArea_2=<%=IpArea_2%>&Ly=<%=Ly%>&PageNum=<%=PageNum%>&Px=AddTime">来访时间</a></td>
	<td>显点间隔</td>
	<td><a href="?Action=<%=Action%>&Ad_ID=<%=Ad_ID%>&AddDate=<%=AddDate%>&Ip=<%=Ip%>&IpArea_2=<%=IpArea_2%>&Ly=<%=Ly%>&PageNum=<%=PageNum%>&Px=VisitTotal">显示次数</a></td>
	<td><a href="?Action=<%=Action%>&Ad_ID=<%=Ad_ID%>&AddDate=<%=AddDate%>&Ip=<%=Ip%>&IpArea_2=<%=IpArea_2%>&Ly=<%=Ly%>&PageNum=<%=PageNum%>&Px=ErrorClickTotal">无效次数</a></td>
    <td><a href="?Action=<%=Action%>&Ad_ID=<%=Ad_ID%>&AddDate=<%=AddDate%>&Ip=<%=Ip%>&IpArea_2=<%=IpArea_2%>&Ly=<%=Ly%>&PageNum=<%=PageNum%>&Px=ScreenWidth">屏幕宽</a></td>
    <td><a href="?Action=<%=Action%>&Ad_ID=<%=Ad_ID%>&AddDate=<%=AddDate%>&Ip=<%=Ip%>&IpArea_2=<%=IpArea_2%>&Ly=<%=Ly%>&PageNum=<%=PageNum%>&Px=ScreenHeight">屏幕高</a></td>
    <td><a href="?Action=<%=Action%>&Ad_ID=<%=Ad_ID%>&AddDate=<%=AddDate%>&Ip=<%=Ip%>&IpArea_2=<%=IpArea_2%>&Ly=<%=Ly%>&PageNum=<%=PageNum%>&Px=WebWidth">页宽</a></td>
    <td><a href="?Action=<%=Action%>&Ad_ID=<%=Ad_ID%>&AddDate=<%=AddDate%>&Ip=<%=Ip%>&IpArea_2=<%=IpArea_2%>&Ly=<%=Ly%>&PageNum=<%=PageNum%>&Px=WebHeight">页高</a></td>
    <td><a href="?Action=<%=Action%>&Ad_ID=<%=Ad_ID%>&AddDate=<%=AddDate%>&Ip=<%=Ip%>&IpArea_2=<%=IpArea_2%>&Ly=<%=Ly%>&PageNum=<%=PageNum%>&Px=WebTop">页顶</a></td>
    <td><a href="?Action=<%=Action%>&Ad_ID=<%=Ad_ID%>&AddDate=<%=AddDate%>&Ip=<%=Ip%>&IpArea_2=<%=IpArea_2%>&Ly=<%=Ly%>&PageNum=<%=PageNum%>&Px=WebLeft">页左</a></td>
    <td><a href="?Action=<%=Action%>&Ad_ID=<%=Ad_ID%>&AddDate=<%=AddDate%>&Ip=<%=Ip%>&IpArea_2=<%=IpArea_2%>&Ly=<%=Ly%>&PageNum=<%=PageNum%>&Px=MouseTop">鼠顶</a></td>
    <td><a href="?Action=<%=Action%>&Ad_ID=<%=Ad_ID%>&AddDate=<%=AddDate%>&Ip=<%=Ip%>&IpArea_2=<%=IpArea_2%>&Ly=<%=Ly%>&PageNum=<%=PageNum%>&Px=MouseLeft">鼠左</a></td>
  </tr>
  <%
While Not Rs.Eof And MyPageSize>0
%>
  <tr class="tr_2"> 
    <td><%=Rs.RecordCount-Rs.Pagesize*(Page)+MyPageSize%></td>
    <td><%=Rs("Ip")%>
<%
 If Rs("IpArea")<>"" Then
  Response.write "<br>"&Rs("IpArea")
 End If
%></td>
    <td><a href="?Action=<%=Action%>&AddDate=<%=AddDate%>&Ad_ID=<%=Rs("Ad_ID")%>"><%=Rs("Ad_ID")%></a>[<a href="?Action=clickflagsearch&Ad_ID=<%=Rs("Ad_ID")%>&AddDate=<%=Rs("AddDate")%>">查</a>]</td>
    <td><%=GetTurnTime(Hour(Rs("FirstShowTime")))&":"&GetTurnTime(Minute(Rs("FirstShowTime")))&":"&GetTurnTime(Second(Rs("FirstShowTime")))%></td>
	<td><%=GetTurnTime(Hour(Rs("AddTime")))&":"&GetTurnTime(Minute(Rs("AddTime")))&":"&GetTurnTime(Second(Rs("AddTime")))%></td>
	<td><%
If isnull(Rs("FirstShowTime"))=False Or Rs("FirstShowTime")="" Then
 Response.write DateDiff("s",Rs("FirstShowTime"),Rs("AddTime"))&"秒"
End If
%></td>
    <td><%=Rs("VisitTotal")%></td>
	<td><%=Rs("ErrorClickTotal")%></td>
	<td><%=Rs("ScreenWidth")%></td>
    <td><%=Rs("ScreenHeight")%></td>
    <td><%=Rs("WebWidth")%></td>
    <td><%=Rs("WebHeight")%></td>
    <td><%=Rs("WebTop")%></td>
    <td><%=Rs("WebLeft")%></td>
    <td><%=Rs("MouseTop")%></td>
    <td><%=Rs("MouseLeft")%></td>
  </tr>


<tr> 
<td colspan="16" class="td_1">
<a href="?Action=<%=Action%>&Ad_ID=<%=Ad_ID%>&AddDate=<%=AddDate%>&Ip=<%=Ip%>&IpArea_2=<%=IpArea_2%>&Ly=<%=Ly%>&PageNum=<%=PageNum%>&Px=Ly_2">点击页面的来源页面</a>:<%
If Rs("Ly_2")<>"" Then
 If Len(Rs("Ly_2"))>90 Then
  Response.Write "<a href="&Rs("Ly_2")&" target='_blank'>"&Left(Rs("Ly_2"),43)&"...."&Mid(Rs("Ly_2"),Len(Rs("Ly_2"))-43)&"</a>"
 Else
  Response.Write "<a href="&Rs("Ly_2")&" target='_blank'>"&Rs("Ly_2")&"</a>"
 End If 
End If
%></td>
</tr>


<tr> 
<td colspan="16" class="td_1">
<a href="?Action=<%=Action%>&Ad_ID=<%=Ad_ID%>&AddDate=<%=AddDate%>&Ip=<%=Ip%>&IpArea_2=<%=IpArea_2%>&Ly=<%=Ly%>&PageNum=<%=PageNum%>&Px=Ly">点击页面</a>:<%
If Rs("Ly")="" Then
 Response.write "直接浏览器访问"
Else
 Response.Write "<a href="&Rs("Ly")&" target='_blank'>"&Rs("Ly")&"</a>"
End If
%></td>
</tr>


<%If Rs("LastUrl")<>"" Then%>
<tr> 
<td colspan="16" class="td_1">
<a href="?Action=<%=Action%>&Ad_ID=<%=Ad_ID%>&AddDate=<%=AddDate%>&Ip=<%=Ip%>&IpArea_2=<%=IpArea_2%>&Ly=<%=Ly%>&PageNum=<%=PageNum%>&Px=LastUrl">最后浏览页面信息</a>(<a href="?Action=<%=Action%>&Ad_ID=<%=Ad_ID%>&AddDate=<%=AddDate%>&Ip=<%=Ip%>&IpArea_2=<%=IpArea_2%>&Ly=<%=Ly%>&PageNum=<%=PageNum%>&Px=LastTime"><%=GetTurnTime(Hour(Rs("LastTime")))&":"&GetTurnTime(Minute(Rs("LastTime")))&":"&GetTurnTime(Second(Rs("LastTime")))%></a> 停留<%=DateDiff("s",Rs("AddTime"),Rs("LastTime"))%>秒)):<%
If Rs("LastUrl")="" Then
 Response.write "直接浏览器访问"
Else
 Response.Write "<a href="&Rs("LastUrl")&" target='_blank'>"&Rs("LastUrl")&"</a>"
End If
%></td>
</tr>
<%End If%>


<tr>
  <td colspan="16" class="td_1" style="border-bottom: 1px dotted #FF0000;padding-left:6px;empty-cells:show;">
[<a href="?Action=<%=Action%>&Ad_ID=<%=Ad_ID%>&AddDate=<%=AddDate%>&Ip=<%=Ip%>&IpArea_2=<%=IpArea_2%>&Ly=<%=Ly%>&PageNum=<%=PageNum%>&Px=BrowserType">浏览器</a>:<%=Rs("BrowserType")%>]
[<a href="?Action=<%=Action%>&Ad_ID=<%=Ad_ID%>&AddDate=<%=AddDate%>&Ip=<%=Ip%>&IpArea_2=<%=IpArea_2%>&Ly=<%=Ly%>&PageNum=<%=PageNum%>&Px=OsType">操作系统</a>:<%=Rs("OsType")%>]
[<a href="?Action=<%=Action%>&Ad_ID=<%=Ad_ID%>&AddDate=<%=AddDate%>&Ip=<%=Ip%>&IpArea_2=<%=IpArea_2%>&Ly=<%=Ly%>&PageNum=<%=PageNum%>&Px=ScreenColorDepth">屏幕色彩</a>:<%=Rs("ScreenColorDepth")%>位]
[<a href="?Action=<%=Action%>&Ad_ID=<%=Ad_ID%>&AddDate=<%=AddDate%>&Ip=<%=Ip%>&IpArea_2=<%=IpArea_2%>&Ly=<%=Ly%>&PageNum=<%=PageNum%>&Px=Alexa">Alexa</a>:<%
If Rs("Alexa")=-1 Then
 Response.write "已安装"
Else
 Response.write "未安装"
End If

Sql="Select AlexaRank From CFWztg_UserSite Where SiteUrl='" & ChkStr(BreakUrl(Rs("Ly"),1),1) &"'"
Set Rs2=Conn.Execute(Sql)

If Not Rs2.Eof Then
 Response.write "(排名:"&Rs2("AlexaRank")&")"
Else
 Response.write "(排名:0)"
End If
%>]
<br />
[<a href="?Action=<%=Action%>&Ad_ID=<%=Ad_ID%>&AddDate=<%=AddDate%>&Ip=<%=Ip%>&IpArea_2=<%=IpArea_2%>&Ly=<%=Ly%>&PageNum=<%=PageNum%>&Px=PvTotal">点击确认PV</a>:<%=Rs("PvTotal")%>]
[<a href="?Action=<%=Action%>&Ad_ID=<%=Ad_ID%>&AddDate=<%=AddDate%>&Ip=<%=Ip%>&IpArea_2=<%=IpArea_2%>&Ly=<%=Ly%>&PageNum=<%=PageNum%>&Px=keyword">搜索引擎关键字</a>:<%="<a href="&Rs("Ly_2")&" target='_blank'>"&Rs("Keyword")&"</a>"%>]
[<a href="?Action=<%=Action%>&Ad_ID=<%=Ad_ID%>&AddDate=<%=AddDate%>&Ip=<%=Ip%>&IpArea_2=<%=IpArea_2%>&Ly=<%=Ly%>&PageNum=<%=PageNum%>&Px=LowUnionUserName">下级联盟用户名</a>:<%=server.HTMLEncode(Rs("LowUnionUserName"))%>]
</td>
</tr>

<%
MyPageSize=MyPageSize-1
Rs.MoveNext
Wend
%>
</table>
<table class="tb_3">
  <tr>
    <td><a href="?Action=<%=Action%>&Ad_ID=<%=Ad_ID%>&AddDate=<%=AddDate%>&Ip=<%=Ip%>&IpArea_2=<%=IpArea_2%>&Ly=<%=Ly%>&Px=<%=Px%>&PageNum=<%=PageNum%>&Page=1">第一页</a>
<%
If Page>1 Then
%>
            <a href='?Action=<%=Action%>&Ad_ID=<%=Ad_ID%>&AddDate=<%=AddDate%>&Ip=<%=Ip%>&IpArea_2=<%=IpArea_2%>&Ly=<%=Ly%>&Px=<%=Px%>&PageNum=<%=PageNum%>&Page=<%=Page-1%>'>上一页</a>
<%
End If
%>
<%
If Page<Rs.PageCount Then
%>
            <a href='?Action=<%=Action%>&Ad_ID=<%=Ad_ID%>&AddDate=<%=AddDate%>&Ip=<%=Ip%>&IpArea_2=<%=IpArea_2%>&Ly=<%=Ly%>&Px=<%=Px%>&PageNum=<%=PageNum%>&Page=<%=Page+1%>'>下一页</a>
            <%

end if
%>
            <a href="?Action=<%=Action%>&Ad_ID=<%=Ad_ID%>&AddDate=<%=AddDate%>&Ip=<%=Ip%>&IpArea_2=<%=IpArea_2%>&Ly=<%=Ly%>&Px=<%=Px%>&PageNum=<%=PageNum%>&Page=<%=Totalpage%>">最后一页</a> 页次:<font color="#ff0000"><%=Page%></font>/<%=TotalPage%>页&nbsp;&nbsp;共<%=IpTotal%>条记录&nbsp;&nbsp;每页显示<%=Rs.PageSize%>条
<%
Response.write "&nbsp;&nbsp;转到第<select id='page' onChange=""window.location=document.getElementById('page').options[document.getElementById('page').selectedIndex].value"">"
For I=1 To TotalPage
 Response.Write "<option value=?Action="&Action&"&Ad_ID="&Ad_ID&"&AddDate="&AddDate&"&Ip="&Ip&"&IpArea_2="&IpArea_2&"&Ly="&Ly&"&Px="&Px&"&PageNum="&PageNum&"&Page="&I
 If Page=I Then Response.Write " selected"
 Response.Write ">"& I &"</option>"
Next
Response.write "</select>页"
%></td>
  </tr>
</table>
<table class="tb_3">
  <form name="form2" method="post" action="?Action=<%=Action%>&AddDate=<%=AddDate%>">
    <tr class="tr_1"> 
      <td colspan="14"><strong>搜 索</strong></td>
    </tr>
    <tr>
      <td>广告ID:</td>
      <td colspan="13"><select id='ad_id' name="ad_id">

<option value="">所有广告</option>
<%
Sql="Select min(b.AdName) as AdName,a.Ad_ID From CFWztg_AD_Counter_Day a inner join cfwztg_ad b on a.ad_id=b.id Where a.UserName='"&UserName&"' Group By a.Ad_ID Order By a.Ad_ID"
Set Rs = Server.CreateObject("Adodb.Recordset")
Rs.open Sql,Conn,1,1
While Not Rs.Eof
 Response.Write "<option value='"&Rs("Ad_ID")&"'"
 If Request("Ad_ID")=Cstr(Rs("Ad_ID")) Then Response.Write " selected"
 Response.Write ">"&Rs("AdName")&"["&Rs("Ad_ID")&"]</option>"
Rs.MoveNext
Wend
%>

</select></td>
    </tr>
    <tr>
      <td>IP:</td>
      <td colspan="13"><input name="IP" type="text" id="IP" value="<%=IP%>" size="30"></td>
    </tr>
    <tr>
      <td>IP范围:</td>
      <td colspan="13"><select name="IpArea_2">
          <option value=""<% If CStr(IpArea_2)="" Then Response.write " selected"%>>全部</option>
		  <option value="1"<% If CStr(IpArea_2)="1" Then Response.write " selected"%>>国内IP</option>
          <option value="2"<% If CStr(IpArea_2)="2" Then Response.write " selected"%>>国外IP</option>
        </select></td>
    </tr>
    <tr>
      <td>来源:</td>
      <td colspan="13"><input name="Ly" type="text" id="Ly" value="<%=Ly%>" size="30"></td>
    </tr>
    <tr>
      <td>每页显示:</td>
      <td colspan="13"><input name="PageNum" type="text" id="PageNum" value="<%=PageNum%>" size="30">
      条</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td colspan="13"><input type="submit" name="Submit3323" value="搜索"></td>
    </tr>
  </form>
</table>